#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sun Nov 19 21:54:49 2023

@author: liqingsimac
"""

#'''
###########################################
##Example 1-1-2-second version
import numpy as np
import matplotlib.pyplot as plt

x=np.linspace(-5,5,501)
C=np.array([-3,-2,-1,0,1,2,3])*3

fig=plt.figure()
ax=fig.add_subplot(111)

for k in range(len(C)):
    y=np.sqrt(x**2+C[k])/2
    ax.plot(x,y,'b-')
    ax.plot(x,-y,'b-')

x1=np.linspace(0,5,501)
y1=1/x1**4
ax.plot(x1,y1,'r-')
ax.set_xlim([-5,5])
ax.set_ylim([-3,3])
ax.set_aspect('equal')
#ax.set_yticks([-10,-5,0,5,10])
#fig.savefig('ode-midterm-3-problem-8.png')
#'''